﻿@model FreeDAM.Domain.Entities.RenditionDefinition

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <div class="editor-label">
            @Html.LabelFor(model => model.Name)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Name)
        @Html.ValidationMessageFor(model => model.Name)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.ToFileType)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.ToFileType)
        @Html.ValidationMessageFor(model => model.ToFileType)
    </div>
    
    <div class="editor-label">
        @Html.LabelFor(model => model.CommandLineArguments)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.CommandLineArguments)
        @Html.ValidationMessageFor(model => model.CommandLineArguments)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.ToMimeType)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.ToMimeType)
        @Html.ValidationMessageFor(model => model.ToMimeType)
    </div>
    
    <div class="editor-label">
        @Html.LabelFor(model => model.AppendToFileName)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.AppendToFileName)
        @Html.ValidationMessageFor(model => model.AppendToFileName)
    </div>

    <div class="editor-field">
        @Html.ListBox("tagIds", ViewBag.Tags as MultiSelectList, new { @class = "chzn-select", data_placeholder="Choose Tag(s)"})
    </div>
    <p>
        <input type="submit" value="Create" />
    </p>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

<script type="text/javascript">
    $(".chzn-select").chosen();
</script>